
#include "syscall.h"

void exitTest1() {
	int i = 0, j = 0;
	FPrint("Entering exitTest1...\n", 23, 0, 0);
	for(i = 0; i < 1000; i++) j++;
	Exit(0);

	FPrint("This should never print!\n", 26, 0, 0);
	Exit(0);
}

void exitTest2() {
	int i = 0, j = 0;
	FPrint("Entering exitTest2...\n", 23, 0, 0);
	for(i = 0; i < 100; i++) j++;
	Exit(0);

	FPrint("This should never print!\n", 26, 0, 0);
	Exit(0);
}

void exitTest3() {
	int i = 0, j = 0;
	FPrint("Entering exitTest3...\n", 23, 0, 0);
	for(i = 0; i < 10; i++) j++;
	Exit(0);

	FPrint("This should never print!\n", 26, 0, 0);
	Exit(0);
}

void exitTest4() {
	int i = 0, j = 0;
	FPrint("Entering exitTest4...\n", 23, 0, 0);
	for(i = 0; i < 1; i++) j++;
	Exit(0);

	FPrint("This should never print!\n", 26, 0, 0);
	Exit(0);
}

int main() 
{
	Fork(exitTest1);
	Fork(exitTest2);
	Fork(exitTest3);
	Fork(exitTest4);
}
